<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2.获取特殊元素</title>
</head>
<body>
    <div class="box">1111111</div>
    <img src="./6c03c9ade060fc9cddcad31fc3dadfec371d8cad.jpg" alt="">
    <img src="https://i1.hdslb.com/bfs/banner/01171db38c7ad1019a50b797a7161d58179e48cc.png@976w_550h_1c_!web-home-carousel-cover.avif" alt="">
    <a href="https://www.baidu.com/">百度一下</a>
    <a href="https://www.baidu.com/">百度一下</a>
    <form action="" method="post"></form>
    <form action="" method="get"></form>
</body>
<script>
    //获取根元素.documentElement是属性
    console.log(document.documentElement)
    //获取body元素,里面包含了script
    console.log(document.body)
    //获取title文本
    console.log(document.title)
    //获取当前页面的URL全称(是本地地址，汉字自动转码了)
    console.log(document.URL)
    //获取域名,
    //当一个网页通过 file:// 协议直接在本地系统上打开时，由于安全原因
    //大多数现代浏览器不允许通过Javascript设置 document.domain
    console.log(document.domain)
    //获取图片合集
    console.log(document.images)
    //获取超链接集合
    console.log(document.links)
    //获取表单结合
    console.log(document.forms)
</script>
</html>